package com.colin.app.activity.view.coordinator;

import android.view.View;

import com.colin.app.R;
import com.colin.app.activity.view.ViewContract;
import com.colin.app.activity.view.ViewPresenterImpl;
import com.colin.app.app.AppActivity;
import com.colin.app.bean.DemoBean;

public class ImageCoordinatorActivity extends AppActivity implements ViewContract.ViewView {
    private ViewContract.ViewPresenter mViewPresenter = null;

    @Override
    protected void onDestroy() {
        if (null != mViewPresenter) {
            mViewPresenter.destroy();
            mViewPresenter = null;
        }
        super.onDestroy();
    }

    @Override
    public void initPresenter() {
        DemoBean demoBean = getIntent().getExtras().getParcelable("clazz");
        mViewPresenter = new ViewPresenterImpl(this, this, demoBean);
    }

    @Override
    public int initViewLayoutID() {
        return R.layout.activity_image_coordinator;
    }

    @Override
    public void initView() {

    }

    @Override
    public void initData() {
        mViewPresenter.setData();
    }

    @Override
    public void initListener() {

    }



    public void titleMode(View v){
        findViewById(R.id.iv_avatar).setVisibility(View.INVISIBLE);
        findViewById(R.id.tv_title).setVisibility(View.VISIBLE);
    }

    public void avatarMode(View v ){

        findViewById(R.id.iv_avatar).setVisibility(View.VISIBLE);
        findViewById(R.id.tv_title).setVisibility(View.INVISIBLE);
    }
}
